package com.lurencun.android.topicbank.ui;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.lurencun.android.support.ui.BackUIActivity;
import com.lurencun.android.topicbank.AppSetting;
import com.lurencun.android.topicbank.R;

public class RandomPracticeActivity extends BackUIActivity {

	private Button mStartBtn;
	private Context mContext;
	@Override
	protected void onCreateEx(Bundle arg0) {
		mContext = this;
		Intent intent = getIntent();
		String title = intent.getStringExtra(AppSetting.MENU_TITLE);
		TextView titleView = (TextView) findViewById(R.id.app_title);
		titleView.setText(title);
		mStartBtn = (Button) findViewById(R.id.startBtn);
		
		mStartBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent mIntent = new Intent();
				mIntent.setClass(mContext, ExtraTopicActivity.class);
				startActivity(mIntent);
				finish();
			}
		});
	}
	
	@Override
	protected int getBackButtonResId() {
		return R.id.back_button;
	}

	@Override
	protected int getContentViewLayoutId() {
		return R.layout.practice_random;
	}

	@Override
	protected boolean isConfirmBack() {
		return false;
	}

}
